package com.itheima.main;

import java.util.Random;

public class Homework03 {
    public static void main(String[] args) {
        int[] arr = {888, 666, 222, 1000, 10000, 2};
        touteng(arr);
    }

    public static void touteng(int[] arr) {
        Random r = new Random();
        int count = 0;
        while (true) {
            if (count == arr.length) {
                break;
            }
            int index = r.nextInt(arr.length);
            if (arr[index] != 0) {
                System.out.println("抽出奖项:" + arr[index] + "元");
                count++;
                arr[index] = 0;
            }
        }

    }
}